Skip to content

fix(win32): don't open extra terminal#159

Merged
angeloashmore merged 1 commit intomainfrom
lh/open-browser
Apr 20, 2026
Merged

fix(win32): don't open extra terminal#159
angeloashmore merged 1 commit intomainfrom
lh/open-browser

Conversation

@lihbr
Copy link
Copy Markdown
Member

@lihbr lihbr commented Apr 20, 2026

Resolves: N/A

Description

This updates the CLI's browser launcher so Windows opens authentication URLs without spawning an extra terminal window. It does that by using start "" "<url>", which avoids having the quoted URL interpreted as the window title.

It also routes login through the shared openBrowser() helper so browser-opening behavior stays centralized and consistent anywhere the CLI launches the user's browser.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

N/A

How to QA 1

  1. On Windows, run the CLI command that opens the browser, such as prismic login.
  2. Confirm the default browser opens to the login URL without a separate terminal window appearing.
  3. Run prismic login --no-browser and confirm the CLI prints the login URL instead of trying to open a browser.

Note

Low Risk
Low risk: small change to how the CLI shells out to open URLs, primarily affecting Windows start behavior; could only impact browser-launching flows.

Overview
Centralizes prismic login browser launching by switching it to the shared openBrowser() helper instead of an inline exec implementation.

Updates openBrowser() on Windows to use start "" "<url>" so opening authentication URLs no longer spawns an extra terminal window and avoids the URL being treated as the window title.

Reviewed by Cursor Bugbot for commit 05d179d. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@lihbr lihbr requested a review from angeloashmore April 20, 2026 06:11
@angeloashmore
Copy link
Copy Markdown
Member

Perfect! Thank you

@angeloashmore angeloashmore merged commit d418cc9 into main Apr 20, 2026
22 of 23 checks passed
@angeloashmore angeloashmore deleted the lh/open-browser branch April 20, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants